/* ----------------------------------------------------------------------
*
* Copyright (C) 2025 XiaoFei. All rights reserved.
*
* $file:		XiaoFei_ADC2.h
* $Date:        26-January-2025
* $Revision: 	V1
* $Project: 	XiaoFei BSP Library
*
* -------------------------------------------------------------------- */

#ifndef __XiaoFei_ADC2_H
#define __XiaoFei_ADC2_H

/* 
* @function: 	ADC2_Init
* @parameter:	[out] ADC2_Pin				 The PA(ADC2_Pin) will use ADC2 to get value.
*/
void ADC2_Init(unsigned int ADC2_Pin);

/* 
* @function: 	ADC2_GetValue
* @parameter:	[out] ADC_Channel			 The PA(ADC_Channel) will use ADC2 to get value.
* @return:		The ADC2 value from PA(ADC_Channel). This value will be mapped from 0 to 3.3 volts to 0 to 4096.
*/
unsigned int ADC2_GetValue(unsigned char ADC_Channel);

/* 
* @function: 	ADC2_GetVoltage
* @parameter:	[out] ADC_Channel			 The PA(ADC_Channel) will use ADC2 to get value.
* @return:		The Voltage value from PA(ADC_Channel). This value need to be limited to 0 to 3.3 volts..
*/
float ADC2_GetVoltage(unsigned char ADC_Channel);

#endif

